From: Paul Eggert Date: Mon, 13 Jun 2011 06:49:00 +0000 (-0700) Subject: * sound.c (Fplay_sound_internal): Remove cast to unsigned long. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~3446^2~24 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=4e16565fe4c5d32e9c8a713f40ef5b9d6fe5a112;p=emacs.git * sound.c (Fplay_sound_internal): Remove cast to unsigned long. It's more likely to cause problems (due to unsigned overflow) than to cure them. --- diff --git a/src/ChangeLog b/src/ChangeLog index 2d736a12dcf..fe4fd6b4985 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-06-13 Paul Eggert + * sound.c (Fplay_sound_internal): Remove cast to unsigned long. + It's more likely to cause problems (due to unsigned overflow) + than to cure them. + * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts. * unexelf.c (unexec): Don't assume BSS addr fits in unsigned. diff --git a/src/sound.c b/src/sound.c index 794c8e64e54..0e71e66352e 100644 --- a/src/sound.c +++ b/src/sound.c @@ -1447,7 +1447,7 @@ Internal use only, use `play-sound' instead. */) } else if (FLOATP (attrs[SOUND_VOLUME])) { - ui_volume_tmp = (unsigned long) XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100; + ui_volume_tmp = XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100; } /* Based on some experiments I have conducted, a value of 100 or less